home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
090
/
cmln1085.arc
/
GSXFILL.INC
< prev
next >
Wrap
Text File
|
1986-02-27
|
5KB
|
118 lines
{ --- filled area functions. Include as file GSXFILL.INC }
{****************************************************************}
procedure fillarea( npts : integer; {in: no. of points on boundary
fill area}
ptsin : pinteger {in: pointer to points array
to be plotted and filled}
);
{****************************************************************}
var contrl : array[1..5] of integer;
intin, intout, ptsout : integer;
begin contrl[1] := 9;
contrl[2] := npts;
contrl[4] := 0;
setpblock( addr(contrl), addr(intin ),
ptsin , addr(intout),
addr(ptsout));
callgdos( addr(pb))
end;
{********************************************************************}
procedure cellarray( intin : pinteger; {in: ptr to color index array}
rowlencolind, {in: row length in cia}
numeltcolind, {in: element no. per row in cia}
numrowscolind, {in: no. of rows in cia}
pixelop, {in: pixel operation:
1 = replace
2 = overstrike
3 = complement
4 = erase}
x1, y1, {in: lower left coordinates}
x2, y2 : integer); {in: upper right coordinates}
{********************************************************************}
{Draws rectangular array of cells using specified colors in color
index array. Non supporting devices will outline rectangle in
current fill color}
var contrl : array[1..9] of integer;
ptsin : array[1..4] of integer;
intout, ptsout : integer;
begin contrl[1] := 10;
contrl[2] := 2;
contrl[4] := numeltcolind * numrowscolind;
contrl[6] := rowlencolind;
contrl[7] := numeltcolind;
contrl[8] := numrowscolind;
contrl[9] := pixelop;
ptsin[1] := x1; ptsin[2] := y1;
ptsin[3] := x2; ptsin[4] := y2;
setpblock( addr(contrl), intin,
addr(ptsin ), addr(intout),
addr(ptsout));
callgdos( addr(pb))
end;
{**********************************************************************}
procedure setfillstyle( fstyle : integer { in: 0 = hollow 1 = solid
2 = pattern 3 = hatch }
);
{**********************************************************************}
var contrl : array[1..5] of integer;
intin, intout, ptsin, ptsout : integer;
begin contrl[1] := 23;
contrl[2] := 0;
contrl[4] := 1;
intin := fstyle;
setpblock( addr(contrl), addr(intin ),
addr(ptsin ), addr(intout),
addr(ptsout));
callgdos( addr(pb))
end;
{****************************************************************************}
procedure setfillpattern( patt:integer; {in: 1..6 = lightest to darkest dither
>6 = device dependent dither }
var selected : integer {out: realized pattern}
);
{****************************************************************************}
var contrl : array[1..5] of integer;
intin, intout, ptsin, ptsout : integer;
begin contrl[1] := 24;
contrl[2] := 0;
contrl[4] := 1;
intin := patt;
setpblock( addr(contrl), addr(intin ),
addr(ptsin ), addr(intout),
addr(ptsout));
callgdos( addr(pb));
selected := intout
end;
{******************************************************************}
procedure setfillhatch( hatch : integer;
{in: 1 = vertical lines 2 = horizontal lines
3 = +45 degree lines 4 = -45 degree lines
5 = crosshatch (1 and 2) 6 = diamond hatch (3 and 4)
>6 = device dependent }
var selected : integer {out: realized hatch style}
);
{********************************************************************}
var contrl : array[1..5] of integer;
intin, intout, ptsin, ptsout : integer;
begin contrl[1] := 24;
contrl[2] := 0;
contrl[4] := 1;
intin := hatch;
setpblock( addr(contrl), addr(intin ),
addr(ptsin ), addr(intout),
addr(ptsout));
callgdos( addr(pb));
selected := intout
end;